﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Class2;
using System.Threading;
using System.Runtime.Remoting.Contexts;
using System.Runtime.Remoting;
namespace progam2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("\n goi tu chuong trinh chinh");
            Class2.Class1.DisplayContextInfo();
            Console.WriteLine("\n");
            MyContextBoundClass myBound=new MyContextBoundClass();
            Console.ReadLine();
        }
    }
    [Synchronization]
    public class MyContextBoundClass : ContextBoundObject
    {
    
        public MyContextBoundClass()
        {
            Console.WriteLine("Doi tu MycontextBoundClass");
            Class2.Class1.DisplayContextInfo();
        }   
    }
    public class MyLazy : Lazy
    {
        public MyLazy()
        {
            Console.Beep();
        }
    }
}
